from solution import Solution


def test():
    sol = Solution()
    test_cases = [
        ([1, 5, 11, 5], True),
        ([1, 2, 3, 5], False),
        ([1, 1, 1, 1], True),
        ([1, 2, 3, 4, 5, 6, 7], True),
        ([1, 2, 5], False),
    ]

    for i, (nums, expected) in enumerate(test_cases):
        result = sol.canPartition(nums)
        assert result == expected, f"Case {i} failed: expected {expected}, got {result}"
    print("All tests passed!")


if __name__ == "__main__":
    test()
